package com.one.service;

import com.one.util.PageUtil;
import com.one.util.RequestReturn;
import com.one.vo.CollectFootpointVo;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @ClassName: UserCollectService
 * @Auther: yph
 * @Date: 2022/1/19 19:18
 * @Description:
 */
@FeignClient("street-product")
public interface UserCollectService {

    /**
     * @Author: yph
     * @Date: 2022/1/19 19:18
     * @return:
     * @Description: 查询用户收藏的商品信息
     */
    @GetMapping("/user/queryCollectProduct")
    RequestReturn<List<CollectFootpointVo>> queryCollectProduct(@RequestParam("userId") Integer userId);

    /**
     * @Author: yph
     * @Date: 2022/1/19 19:24
     * @return:
     * @Description: 查询用浏览过的记录
     */
    @GetMapping("/user/queryFootpoint")
    RequestReturn<PageUtil<List<CollectFootpointVo>>> queryFootpointByUserId(@RequestParam("userId") Integer userId, @RequestParam("pageNo") Integer pageNo, @RequestParam("pageSize") Integer pageSize);

    /**
     * @Author: yph
     * @Date: 2022/1/19 15:26
     * @return:
     * @Description: 收藏/取消商品
     */
    @GetMapping("/user/collectProduct")
    RequestReturn<String> collectProduct(@RequestParam("userId") Integer userId, @RequestParam("productId") Integer productId);

    /**
     * @Author: yph
     * @Date: 2022/1/19 15:26
     * @return:
     * @Description: 收藏/取消商品
     */
    @GetMapping("/user/collectProducts")
    RequestReturn<String> collectProducts(@RequestParam("userId") Integer userId, @RequestParam("productIds") List<Integer> productIds);

    /**
     * @Author: yph
     * @Date: 2022/1/21 22:34
     * @return: 
     * @Description: 清空收藏夹，
    */
    @GetMapping("/user/clearUserCollect/{userId}")
    RequestReturn<String> clearUserCollect(@PathVariable("userId") Integer userId);

    /**
     * @Author: yph
     * @Date: 2022/1/21 23:31
     * @return: 
     * @Description: 清空历史记录
    */
    @GetMapping("/user/clearUserFootPoint/{userId}")
    RequestReturn<String> clearUserFootPoint(@PathVariable("userId") Integer userId);
}
